<?php



require "database.php";


$base=new Db;

$title              =$_POST['title'];
$subtitle           =$_POST['subtitle'];
$typeid             =(int)$_POST['typeid'];
$tags               =$_POST['tags'];
$litpic             =$_POST['litpic'];
$seo_title          =$_POST['seo_title'];
$seo_keywords       =$_POST['seo_keywords'];
$seo_description    =$_POST['seo_description'];
$author             =$_POST['author'];
$origin             =$_POST['origin'];
$click              =$_POST['click'];
$add_time           =strtotime($_POST['add_time']);
$content            =$_POST["content"];
$id                 =$_POST["id"];
$__archives__=$base->doSql('update ey_archives set title="'.$title.'",subtitle="'.$subtitle.'",typeid="'.$typeid.'",tags="'.$tags.'",litpic="'.$litpic.'",seo_title="'.$seo_title.'",seo_keywords="'.$seo_keywords.'",seo_description="'.$seo_description.'",author="'.$author.'",origin="'.$origin.'",content="'.$content.'",click="'.$click.'",add_time="'.$add_time.'",update_time="'.time().'" where aid="'.$id.'"');


if($__archives__){
    return json([
        "code"=>200    
    ]);
}else{
    return json([
        "code"=>-1    
    ]);
}
